package com.muyu.product.domain.req;

import com.muyu.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @ClassName ShopLadderReq
 * @Description 描述
 * @Author ShiYu.Cui
 * @Date 2024/3/26 20:19
 */
@Data
@ApiModel(description = "阶梯价格")
public class ShopLadderReq extends BaseEntity {

    private Integer id;

    @NotNull(message = "阶梯数量不能为空")
    @DecimalMin(value = "1", inclusive = true, message = "阶梯数量必须大于等于1")
    @ApiModelProperty(value = "阶梯数量")
    private Integer ladderNum;

    @NotNull(message = "阶梯折扣不能为空")
    @DecimalMax(value = "1", inclusive = true, message = "阶梯折扣必须小于等于1")
    @DecimalMin(value = "0", inclusive = true, message = "阶梯折扣必须大于等于0")
    @ApiModelProperty(value = "阶梯折扣")
    private Double ladderDiscount;

    @ApiModelProperty(value = "商品id")
    private Integer shopId;
}
